cmake_minimum_required(VERSION 2.6)

PROJECT(libdagger)

SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-modules")

IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE release CACHE STRING
      "Choose the type of build, options are: debug release"
      FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)


SET(libSources ${libSources} "src/dummy.cpp")
SET(libIncludes ${libIncludes}) 
SET(testSources ${testSources} "src/test.cpp")
SET(includeDirs ${includeDirs} "${CMAKE_SOURCE_DIR}/include")

INCLUDE_DIRECTORIES(${includeDirs})
ADD_LIBRARY(dagger SHARED ${libSources} ${libIncludes})
ADD_EXECUTABLE(libdagger-test ${testSources} ${testIncludes})

TARGET_LINK_LIBRARIES(dagger ${optLibs})
TARGET_LINK_LIBRARIES(libdagger-test dagger)

INSTALL_FILES(/include/dagger FILES ${libIncludes})
INSTALL_TARGETS(/lib RUNTIME_DIRECTORY /bin dagger)
